<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        * {
            padding: 0;
            margin: 0;
        }
        #container{
            background: url("/static/images/back.png") no-repeat;
            height: 1060px;
            background-size: cover;

        }
        .container {
            height: 700px;
            width: 600px;
            border-radius: 30px;
            position: relative;
            top: 180px;
            margin: auto;
            box-sizing: border-box;
            background: rgba(0, 0, 0, 0.6);

        }
        .container > img{
            width: 150px;
            border-radius: 75px;
            margin: 50px 225px 10px;
            float: left;
        }
        .headline {
            color: white;
            font-size: 30px;
            width: 600px;
            text-align: center;
        }
        .register{
            float: left;
            margin-left: 100px;
        }
        .forget {
            float: right;
            margin-right: 100px;
        }
        .forget, .register{
            text-decoration: none;
            margin-bottom: 30px;
            font-size: 20px;
            margin-top: 30px;
        }
        .input>input,.login>input{
            width: 400px;
            height: 50px;
            border-radius: 25px;
            margin-top: 30px;
            margin-left: 100px;
            text-align: center;
            outline: none;
            font-size: 18px;
            background: rgba(0, 0, 0, 0.2);
            color: white;
        }
        #check_info1 {
            width: 400px;
            height: 50px;
            border-radius: 25px;
            outline: none;
            margin-left: 100px;
            margin-right: 100px;
            margin-top: 30px;
            text-align: center;
            font-size: 18px;
            background: rgba(0, 0, 0, 0.2);
            color: white;
        }

        a{
            text-decoration: none;
            color: aquamarine;

        }
        a:hover {
            font-weight: bold;
        }
        .login>input {
            color: aquamarine;
        }
        .agree {
            color: white;
            margin-top: 30px;
            width: 300px;
            margin-right: 150px;
            margin-left: 150px;
            font-size: 18px;
        }
        .hint{
            margin-left: 230px;
            color: orangered;
        }
    </style>
</head>
<body>

<div id="container">
    <div class="container">
        <img src="/static/images/jisuanjiwangluo.jpg" alt="头像">
        <div class="headline">用户注册</div>
        <p class="hint">{{ hint }}</p>
        <form action="/register/" method="post">
            {% csrf_token %}
            <div class="input">
                <input type="text" name="username" placeholder="邮箱/用户名" maxlength="20" required >
            </div>
            <div class="input">
                <input type="password" name="password" placeholder="设置登陆密码" required>
            </div>
            <input type="text" name="tel" id="check_info1" placeholder="请输入手机号码">

            <div class="agree">
                <input type="checkbox" name="agreement" id="checkbox">&nbsp;&nbsp;我已同意网站<a href="">用户协议及隐私政策</a>
            </div>
            <div class="login">
                <input type="submit" value="立即注册" onclick="on_change()">
            </div>
        </form>

        <div class="register">
            <a href="/login/">返回登录</a>
        </div>
        <div class="forget">
            <a href="/">返回首页</a>
        </div>
    </div>
    <script>
        let checkbox = document.getElementById('checkbox')
        function on_change() {
            if (checkbox.checked) {
                alert('注册成功，即将跳转登录页面...')
            } else {
                alert('请勾选用户协议!')
            }
        }
    </script>
</div>
</body>
</html>